"extratime", extratime);
}
-static PyObject *pyxc_shadow_control(PyObject *self,
- PyObject *args,
- PyObject *kwds)
-{
- XcObject *xc = (XcObject *)self;
-
- uint32_t dom;
- int op=0;
-
- static char *kwd_list[] = { "dom", "op", NULL };
-
- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list,
- &dom, &op) )
- return NULL;
-
- if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, NULL) < 0 )
- return PyErr_SetFromErrno(xc_error);
-
- Py_INCREF(zero);
- return zero;
-}
-
static PyObject *pyxc_domain_setmaxmem(PyObject *self,
PyObject *args,
PyObject *kwds)
"Returns [dict]: information about Xen"
" [None]: on failure.\n" },
- { "shadow_control",
- (PyCFunction)pyxc_shadow_control,
- METH_VARARGS | METH_KEYWORDS, "\n"
- "Set parameter for shadow pagetable interface\n"
- " dom [int]: Identifier of domain.\n"
- " op [int, 0]: operation\n\n"
- "Returns: [int] 0 on success; -1 on error.\n" },
-
{ "domain_setmaxmem",
(PyCFunction)pyxc_domain_setmaxmem,
METH_VARARGS | METH_KEYWORDS, "\n"
if not dev:
raise XendError("invalid vif")
return dev.setCreditLimit(credit, period)
-
- def domain_shadow_control(self, domid, op):
- """Shadow page control."""
- dominfo = self.domain_lookup(domid)
- try:
- return xc.shadow_control(dominfo.getDomid(), op)
- except Exception, ex:
- raise XendError(str(ex))
+
def domain_maxmem_set(self, domid, mem):
"""Set the memory limit for a domain.